
//远程api配置
this.remote = {
    address : 'www.yaopaikeji.com',
    port:8080
};

//session配置
this.session = {
    secret : 'bc7669f0-ecaa-46a6-ba50-b353077a510b',
    max_age : 10 * 60 * 1000//10分钟
};

//角色
this.roles = {
    LOGIN: 'login',
    ADMIN: 'admin',
    ROOT: 'root'
};

//角色对应的值
this.rolesValue = {
    root: 1,
    admin: 2,
    login: 3
};

//权限过滤规则
this.filter = { 
    includes:[ //路径和所需最低权限 正则表达式
        // {
        //     path : /^\/login/,
        //     rule : this.roles.LOGIN
        // },
        {
            path: /^\/user/,  // /user
            rule: this.roles.ROOT
        }
    ]
};

module.exports.remote = this.remote
module.exports.request = require('request').defaults({jar: true});
module.exports.session = this.session;
module.exports.filter = this.filter;
module.exports.roles = this.roles;
module.exports.rolesValue = this.rolesValue;